Skip to content

Conversation

@FrankSpitulski
Copy link
Contributor

@FrankSpitulski FrankSpitulski commented Jan 12, 2021

I have observed a 40-50% reduction in CPU usage at 600 queries per second by deferring the string format operation.
There are no functional changes so I haven't changed the tests.

  • You have read the Spring Data contribution guidelines.
  • You use the code formatters provided here and have them applied to your changes. Don’t submit any formatting related changes.
  • You submit test cases (unit or integration tests) that back your changes.
  • You added yourself as author in the headers of the classes you touched. Amend the date range in the Apache license header if needed. For new types, add the license header (copy from another file and set the current year only).

@pivotal-issuemaster
Copy link

@FrankSpitulski Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

@pivotal-issuemaster
Copy link

@FrankSpitulski Thank you for signing the Contributor License Agreement!

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jan 12, 2021
@FrankSpitulski
Copy link
Contributor Author

@mp911de you seem to be the maintainer of this project, so I'll tag you here.

@mp911de mp911de self-assigned this Jan 13, 2021
@mp911de mp911de added type: task A general task and removed status: waiting-for-triage An issue we've not yet triaged labels Jan 13, 2021
@mp911de
Copy link
Member

mp911de commented Jan 13, 2021

Thanks a lot. No need for @-mentions since the projects are monitored regularly.

It makes sense to defer message creation as String.format(…) is indeed quite expensive.

@mp911de mp911de added this to the 3.0.7 (Neumann SR7) milestone Jan 13, 2021
mp911de pushed a commit that referenced this pull request Jan 13, 2021
@mp911de mp911de changed the title non constant assert messages are now deferred to improve performance Defer non-constant assert messages to improve performance Jan 13, 2021
mp911de pushed a commit that referenced this pull request Jan 13, 2021
mp911de pushed a commit that referenced this pull request Jan 13, 2021
@mp911de
Copy link
Member

mp911de commented Jan 13, 2021

Thank you for your contribution. That's merged and backported now.

@mp911de mp911de closed this Jan 13, 2021
@FrankSpitulski FrankSpitulski deleted the fix/performance/assert branch January 13, 2021 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: task A general task

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants